﻿Imports Equipment.DataAccess

Public Class RequirementFrequencyHelper
    Public Shared Function GetListByFrequencyString(ByVal frequency As String) As List(Of RequirementFrequency)
        Dim frequencyList As New List(Of RequirementFrequency)
        If frequency = "Daily" Then
            frequencyList.Add(RequirementFrequency.EveryXDays)
            frequencyList.Add(RequirementFrequency.TwiceDaily)
            frequencyList.Add(RequirementFrequency.EveryXHours)
        ElseIf frequency = "Weekly" Then
            frequencyList.Add(RequirementFrequency.EveryXWeeks)
        ElseIf frequency = "Monthly" Then
            frequencyList.Add(RequirementFrequency.EveryXMonth)
        Else
            frequencyList.Add(RequirementFrequency.EveryXDays)
            frequencyList.Add(RequirementFrequency.TwiceDaily)
            frequencyList.Add(RequirementFrequency.EveryXHours)
            frequencyList.Add(RequirementFrequency.EveryXWeeks)
            frequencyList.Add(RequirementFrequency.EveryXMonth)
            frequencyList.Add(RequirementFrequency.WhenUsed)
            frequencyList.Add(RequirementFrequency.EveryXYears)
            frequencyList.Add(RequirementFrequency.TwiceDaily)
        End If
        Return frequencyList
    End Function

End Class
